* THIS FILE GENERATES RESULTS IN THE APPENDIX.  STATEMENTS ARE SORTED BASED ON DECLINING EXPERT IMPORTANCE.

set more off 
clear
capture log close

* SET DIRECTORY HERE 
cd "C:\Users\mitch\Dropbox\BLW\POP\Searching for a Bright Line\Searching for a Bright Line replication materials" 
use "Data/BLW_Public_Waves3456.dta", clear
log using "Logs/appendix.log", replace text

numlabel, add

tab wave 
sort wave


recode perf_misconduct-perf_investigations (1=0) (2=0) (3=1) (4=1) (5=.)
label value perf_misconduct-perf_investigations statementlabel

recode imp_misconduct-imp_investigations (0=0) (1=0) (2=1) (3=1) 
label value imp_misconduct-imp_investigations statementlabel  

gen trump = approve_trmp
recode trump (2 = 1) (3 = 0) (4 = 0) (8 = .) (9 = .)
label define trumpLabel 0 "Not approve Trump" 1 "Approve Trump"
label value trump trumpLabel



* PUBLIC IMPORTANCE
tabstat ///
imp_election_fraud  imp_protest  imp_equal_rights  imp_journalists  imp_monitor_opponents  imp_free_speech  imp_voting_rights  ///
imp_investigations  imp_opinions  imp_private_violence  imp_judicial_ind  imp_misconduct  imp_ban_ideology  imp_legislature_check  ///
imp_judiciary_check  imp_expand_executive  imp_candidates_disclose  imp_votes_impact  imp_foreign_influence  imp_districts  ///
imp_private_gain  imp_funds_transparent  imp_contributions  imp_common_und  imp_participation  imp_compromise  imp_patriotism  ///
 if wave==3 [aw=weight], format(%8.2f) col(statistics) la(25) var(25)

* PUBLIC PERFORMANCE
tabstat ///
perf_election_fraud  perf_protest  perf_equal_rights  perf_journalists  perf_monitor_opponents  perf_free_speech  perf_voting_rights  ///
perf_investigations  perf_opinions  perf_private_violence  perf_judicial_ind  perf_misconduct  perf_ban_ideology  perf_legislature_check  ///
perf_judiciary_check  perf_expand_executive  perf_candidates_disclose  perf_votes_impact  perf_foreign  perf_districts  ///
perf_private_gain  perf_funds_transparent  perf_contributions  perf_common_und  perf_participation  perf_compromise  perf_patriotism  ///
 [aw=weight], format(%5.2f) by(wave) col(statistics) la(25) var(25)

* TRUMP SUPPORTER IMPORTANCE
tabstat ///
imp_election_fraud  imp_protest  imp_equal_rights  imp_journalists  imp_monitor_opponents  imp_free_speech  imp_voting_rights  ///
imp_investigations  imp_opinions  imp_private_violence  imp_judicial_ind  imp_misconduct  imp_ban_ideology  imp_legislature_check  ///
imp_judiciary_check  imp_expand_executive  imp_candidates_disclose  imp_votes_impact  imp_foreign_influence  imp_districts  ///
imp_private_gain  imp_funds_transparent  imp_contributions  imp_common_und  imp_participation  imp_compromise  imp_patriotism  ///
 if (wave==3 & trump==1) [aw=weight], format(%8.2f) col(statistics) la(25) var(25)

* TRUMP SUPPORTER PERFORMANCE
tabstat ///
perf_election_fraud  perf_protest  perf_equal_rights  perf_journalists  perf_monitor_opponents  perf_free_speech  perf_voting_rights  ///
perf_investigations  perf_opinions  perf_private_violence  perf_judicial_ind  perf_misconduct  perf_ban_ideology  perf_legislature_check  ///
perf_judiciary_check  perf_expand_executive  perf_candidates_disclose  perf_votes_impact  perf_foreign  perf_districts  ///
perf_private_gain  perf_funds_transparent  perf_contributions  perf_common_und  perf_participation  perf_compromise  perf_patriotism  ///
 if (trump==1) [aw=weight], format(%5.2f) by(wave) col(statistics) la(25) var(25)

 
 * TRUMP OPPONBENT IMPORTANCE
tabstat ///
imp_election_fraud  imp_protest  imp_equal_rights  imp_journalists  imp_monitor_opponents  imp_free_speech  imp_voting_rights  ///
imp_investigations  imp_opinions  imp_private_violence  imp_judicial_ind  imp_misconduct  imp_ban_ideology  imp_legislature_check  ///
imp_judiciary_check  imp_expand_executive  imp_candidates_disclose  imp_votes_impact  imp_foreign_influence  imp_districts  ///
imp_private_gain  imp_funds_transparent  imp_contributions  imp_common_und  imp_participation  imp_compromise  imp_patriotism  ///
 if (wave==3 & trump==0) [aw=weight], format(%8.2f) col(statistics) la(25) var(25)

* TRUMP OPPONENT PERFORMANCE
tabstat ///
perf_election_fraud  perf_protest  perf_equal_rights  perf_journalists  perf_monitor_opponents  perf_free_speech  perf_voting_rights  ///
perf_investigations  perf_opinions  perf_private_violence  perf_judicial_ind  perf_misconduct  perf_ban_ideology  perf_legislature_check  ///
perf_judiciary_check  perf_expand_executive  perf_candidates_disclose  perf_votes_impact  perf_foreign  perf_districts  ///
perf_private_gain  perf_funds_transparent  perf_contributions  perf_common_und  perf_participation  perf_compromise  perf_patriotism  ///
 if (trump==0) [aw=weight], format(%5.2f) by(wave) col(statistics) la(25) var(25)
 
 
 
 
 * READ EXPERT DATA
clear
use "Data/BLW_Expert_Waves123456.dta", clear

tab wave

recode perf_misconduct-perf_investigations (1=0) (2=0) (3=1) (4=1) (5=.)
label value perf_misconduct-perf_investigations statementlabel

recode imp_misconduct-imp_investigations (0=0) (1=0) (2=1) (3=1) 
label value imp_misconduct-imp_investigations statementlabel   


* EXPERT IMPORTANCE
tabstat ///
imp_election_fraud  imp_protest  imp_equal_rights  imp_journalists  imp_monitor_opponents  imp_free_speech  imp_voting_rights  ///
imp_investigations  imp_opinions  imp_private_violence  imp_judicial_ind  imp_misconduct  imp_ban_ideology  imp_legislature_check  ///
imp_judiciary_check  imp_expand_executive  imp_candidates_disclose  imp_votes_impact  imp_foreign_influence  imp_districts  ///
imp_private_gain  imp_funds_transparent  imp_contributions  imp_common_und  imp_participation  imp_compromise  imp_patriotism  ///
 if wave==3, format(%5.2f) col(statistics) la(25) var(25)

* EXPERT PERFORMANCE
tabstat ///
perf_election_fraud  perf_protest  perf_equal_rights  perf_journalists  perf_monitor_opponents  perf_free_speech  perf_voting_rights  ///
perf_investigations  perf_opinions  perf_private_violence  perf_judicial_ind  perf_misconduct  perf_ban_ideology  perf_legislature_check  ///
perf_judiciary_check  perf_expand_executive  perf_candidates_disclose  perf_votes_impact  perf_foreign  perf_districts  ///
perf_private_gain  perf_funds_transparent  perf_contributions  perf_common_und  perf_participation  perf_compromise  perf_patriotism  ///
 , format(%5.2f) by(wave) col(statistics) la(35) var(35)

 log close
 
